#ifndef AVATARCHANGEDEVENT_H_
#define AVATARCHANGEDEVENT_H_

#include <wx/event.h>
#include "../Buddy.h"

namespace Impp{

class AvatarChangedEvent : public wxNotifyEvent
{
private:
	Buddy* buddy;

public:
	AvatarChangedEvent(Buddy* b, wxEventType eventType = wxEVT_NULL, int id = 0);
	virtual ~AvatarChangedEvent();

	virtual wxEvent* Clone()const;
	Buddy* getBuddy();
};

// ein Typedef auf die entsprechenden EventHandler
typedef void(wxEvtHandler::*AvatarChangedEventFunction)(AvatarChangedEvent&);

// wxWidgets den neuen Event mitteilen
BEGIN_DECLARE_EVENT_TYPES()
  DECLARE_EVENT_TYPE(EVT_BUDDY_AVATAR_CHANGED, -1)
  DECLARE_EVENT_TYPE(EVT_OWN_AVATAR_CHANGED, -1)
END_DECLARE_EVENT_TYPES()


#define AvatarChangedEventHandler(func)                                                 \
        (wxObjectEventFunction)                                                \
        (wxEventFunction)wxStaticCastEvent(AvatarChangedEventFunction, &func)


}

#endif /*AVATARCHANGEDEVENT_H_*/
